﻿<%@ Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true"
    CodeFile="user_favcat.aspx.cs" Inherits="user_favcat" Title="Mục yêu thích" %>
<%@ Import Namespace="ThoiTrang.Business" %>
<%@ Register Src="~/UserControls/left_user.ascx" TagName="MenuLeft" TagPrefix="uc" %>
<%@ Register Src="~/UserControls/Advertising.ascx" TagName="Adv" TagPrefix="uc" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentCss" runat="Server">
    <link href="css/reg.css" rel="stylesheet" type="text/css" />
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentFooter" runat="Server">
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="ContentMenu" runat="Server">
    <uc:MenuLeft ID="MenuLeft1" runat="server" GroupId="1" />
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="ContentMain" runat="Server">
    <div class="reg-wrap">
        <h3>
            <img src="images/muc-yeu-thich-hp.gif" alt="thoi trang" width="400" height="40" /></h3>
        <!--Reg-->
        <div class="msg" id="msg" runat="server" visible=false></div>
        <div class="reg line">
        <%
            if (favs != null && favs.Count > 1)
            {
             %>
            <table id="fav_table" width="100%" border="0" cellspacing="0" cellpadding="0">
                <tr class="cap">
                    <td width="86%">
                        Tên mục
                    </td>
                    <td width="14%">
                        Thao Tác
                    </td>
                </tr>
                <%
                    
            int dem = 0;
            foreach (a_Favorite fav in favs.ToArray())
            {
                a_CatSub catsub = a_CatSubService.Geta_CatSub(fav.FavoriteID);
                if (catsub != null)
                {                                                               
                     %>
                <tr class="row_<%=dem%2==0?"a":"b" %>">
                    <td class="title">
                        <a href="listing.aspx?mcid=<%= catsub.MainCatID %>&scid=<%=catsub.SubCatID %>&ckid=<%=SessionManager.GetCookie() %>"><%=catsub.Name%></a>
                         <%--<span>(238)</span>--%>
                    </td>
                    <td class="edit_del">
                        <a href="user_favcat.aspx?a=del&dt=1&fid=<%=fav.ID %>&ckid=<%=SessionManager.GetCookie() %>">
                            <img src="images/ico_delete.gif" alt="delete" width="16" height="13" /></a>
                    </td>
                </tr>
                <%      }
                dem++;
            }
                 %>
                
            </table>
            <%}
            else
            { %>
            <p style="color:#8D0045; background:#F7F6BD; padding:20px 10px;">Bạn chưa lưu mục yêu thích nào!</p>
            <%
            } %>
        </div>
        <!--//Reg-->
    </div>
</asp:Content>
<asp:Content ID="Content5" ContentPlaceHolderID="ContentLeft" runat="Server">
    <uc:Adv ID="Adv1" runat="server" />
</asp:Content>
